import request from '@/utils/request'
import { getApiUrl } from '@/utils/request'

export function listRoom(query) {
  return request({
    url: '/data/room/list',
    method: 'get',
    params: query
  })
}

export function createRoom(data) {
  return request({
    url: '/data/room/create',
    method: 'post',
    data
  })
}

export function readRoom(data) {
  return request({
    url: '/data/room/read/' + data.id,
    method: 'get'
  })
}

export function updateRoom(data) {
  return request({
    url: '/data/room/update',
    method: 'post',
    data
  })
}

export function deleteRoom(data) {
  return request({
    url: '/data/room/delete/' + data.fpointNo,
    method: 'delete'
  })
}

export function roomOptions(query) {
  return request({
    url: '/data/room/options',
    method: 'get',
    params: query
  })
}

const uploadPath2 = getApiUrl() + 'data/room/upload'
export { uploadPath2 }


const uploadPath = getApiUrl() + 'data/room/uploadFile'
export { uploadPath }


